package com.sg.controller.pbff;

import com.sg.service.biz.pbff.MemberService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Member", tags = {"Member"})
@RestController
// @RequestMapping("/poms/member/")
public class MemberController {
    @Autowired
    MemberService memberService;

    /**
     * B1-2查询员工身份人员列表（平台）
     * gen by moon at 8/10/2022, 3:40:01 AM
     */
    @PostMapping("/oms/platform/member/queryStaffBeginMemberList")
    @ApiOperation(value = "B1-2查询员工身份人员列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStaffBeginMemberListRespDto> queryStaffBeginMemberList(@RequestBody(required = false) @Validated BffQueryStaffBeginMemberListReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffBeginMemberList(reqDTO));
    }

    /**
     * B1-2查询角色人员详情（平台）
     * gen by moon at 10/24/2022, 4:54:21 AM
     */
    @PostMapping("/oms/platform/member/queryRoleRelDetail")
    @ApiOperation(value = "B1-2查询角色人员详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryRoleRelDetailRespDto> queryRoleRelDetail(@RequestBody(required = false) @Validated BffQueryRoleRelDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryRoleRelDetail(reqDTO));
    }

    /**
     * B1-新增空间管理员角色人员（平台）
     * gen by moon at 8/31/2022, 12:18:49 AM
     */
    @PostMapping("/oms/platform/member/addAdminRoleRel")
    @ApiOperation(value = "B1-新增空间管理员角色人员（平台）", response = OkrResult.class)
    public OkrResult<BffAddAdminRoleRelRespDto> addAdminRoleRel(@RequestBody(required = false) @Validated BffAddAdminRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.addAdminRoleRel(reqDTO));
    }

    /**
     * B1-2查询角色人员列表（平台）
     * gen by moon at 8/15/2022, 10:27:36 PM
     */
    @PostMapping("/oms/platform/member/queryRoleRelList")
    @ApiOperation(value = "B1-2查询角色人员列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryRoleRelListRespDto> queryRoleRelList(@RequestBody(required = false) @Validated BffQueryRoleRelListReqDto reqDTO) {
        return OkrResult.success(memberService.queryRoleRelList(reqDTO));
    }

    /**
     * B1-2查询员工身份人员详情（平台）
     * gen by moon at 8/29/2022, 7:40:45 PM
     */
    @PostMapping("/oms/platform/member/queryStaffBeginMemberDetail")
    @ApiOperation(value = "B1-2查询员工身份人员详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStaffBeginMemberDetailRespDto> queryStaffBeginMemberDetail(@RequestBody(required = false) @Validated BffQueryStaffBeginMemberDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffBeginMemberDetail(reqDTO));
    }

    /**
     * B1-2查询字母身份人员列表(平台)
     * gen by moon at 9/14/2022, 10:18:55 PM
     */
    @PostMapping("/oms/platform/mgt/member/queryLetterBeginMemberList")
    @ApiOperation(value = "B1-2查询字母身份人员列表(平台)", response = OkrResult.class)
    public OkrResult<BffQueryLetterBeginMemberListRespDto> queryLetterBeginMemberList(@RequestBody(required = false) @Validated BffQueryLetterBeginMemberListReqDto reqDTO) {
        return OkrResult.success(memberService.queryLetterBeginMemberList(reqDTO));
    }

}

